XmlWriter that automatically close elements using IDisposable

System.Xml.XmlWriter provides an easy and lightweight way to write xml strings, unfortunately it has a little gotcha. consider the following xml string (borrowed from IronPython in Action): Using XmlWriter the following code is needed to create that string: Keep in mind the fact that the code above only creates 5 lines of xml, and as … Continue reading XmlWriter that automatically close elements using IDisposable